package com.ly.mpayment.persist.entity.yidong;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * NumberPool entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "number_pool")

public class NumberPool implements java.io.Serializable {

	// Fields

	private String numberPoolId;
	private Integer state;
	private Date createTime;
	private Date loginTime;
	private Date renovateTime;
	private Integer currentNum;
	private Integer sumNum;
	private Integer successNum;
	private Integer falitNum;
	private Integer isRecharge;
	private String smsCode;
	private String mobilePhone;
	private String operators;
	private String city;
	private Integer isUsed;
	private String remark;
	private String pid;




	private Set<MobileOrders> mobileOrderses = new HashSet<MobileOrders>(0);

	// Constructors

	/** default constructor */
	public NumberPool() {
	}

	/** full constructor */
	public NumberPool(Integer state, Date createTime, Date loginTime, Date renovateTime, Integer currentNum,
			Integer sumNum, Integer successNum, Integer falitNum, Integer isRecharge, String smsCode,
			String mobilePhone, Set<MobileOrders> mobileOrderses ) {
		this.state = state;
		this.createTime = createTime;
		this.loginTime = loginTime;
		this.renovateTime = renovateTime;
		this.currentNum = currentNum;
		this.sumNum = sumNum;
		this.successNum = successNum;
		this.falitNum = falitNum;
		this.isRecharge = isRecharge;
		this.smsCode = smsCode;
		this.mobilePhone = mobilePhone;
		this.mobileOrderses = mobileOrderses;
	}

	@Id
	@GeneratedValue(generator = "uuid")
	@GenericGenerator(name = "uuid", strategy = "uuid")
	@Column(name = "number_pool_id", unique = true, nullable = false, length = 36)
	public String getNumberPoolId() {
		return this.numberPoolId;
	}

	public void setNumberPoolId(String numberPoolId) {
		this.numberPoolId = numberPoolId;
	}

	@Column(name = "state")

	public Integer getState() {
		return this.state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	@Column(name = "create_time", length = 19)

	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "login_time", length = 19)

	public Date getLoginTime() {
		return this.loginTime;
	}

	public void setLoginTime(Date loginTime) {
		this.loginTime = loginTime;
	}

	@Column(name = "renovate_time", length = 19)

	public Date getRenovateTime() {
		return this.renovateTime;
	}

	public void setRenovateTime(Date renovateTime) {
		this.renovateTime = renovateTime;
	}

	/**
	 * 当月成功次数
	 *
	 * @return
	 */
	@Column(name = "current_num")
	public Integer getCurrentNum() {
		return this.currentNum;
	}

	public void setCurrentNum(Integer currentNum) {
		this.currentNum = currentNum;
	}

	@Column(name = "sum_num")

	public Integer getSumNum() {
		return this.sumNum;
	}

	public void setSumNum(Integer sumNum) {
		this.sumNum = sumNum;
	}

	@Column(name = "success_num")

	public Integer getSuccessNum() {
		return this.successNum;
	}

	public void setSuccessNum(Integer successNum) {
		this.successNum = successNum;
	}

	@Column(name = "falit_num")

	public Integer getFalitNum() {
		return this.falitNum;
	}

	public void setFalitNum(Integer falitNum) {
		this.falitNum = falitNum;
	}

	@Column(name = "is_recharge")

	public Integer getIsRecharge() {
		return this.isRecharge;
	}

	public void setIsRecharge(Integer isRecharge) {
		this.isRecharge = isRecharge;
	}

	@Column(name = "sms_code", length = 10)

	public String getSmsCode() {
		return this.smsCode;
	}

	public void setSmsCode(String smsCode) {
		this.smsCode = smsCode;
	}

	@Column(name = "mobile_phone", length = 20)

	public String getMobilePhone() {
		return this.mobilePhone;
	}

	public void setMobilePhone(String mobilePhone) {
		this.mobilePhone = mobilePhone;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "numberPool")

	public Set<MobileOrders> getMobileOrderses() {
		return this.mobileOrderses;
	}

	public void setMobileOrderses(Set<MobileOrders> mobileOrderses) {
		this.mobileOrderses = mobileOrderses;
	}


	@Column(name = "operators")
	public String getOperators() {
		return operators;
	}

	public void setOperators(String operators) {
		this.operators = operators;
	}
	@Column(name = "city")
	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}
	@Column(name = "remark")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "is_used")
	public Integer getIsUsed() {
		return isUsed;
	}

	public void setIsUsed(Integer isUsed) {
		this.isUsed = isUsed;
	}

	@Column(name = "pid")
	public String getPid() {
		return pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	@Override
	public String toString() {
		return "NumberPool [numberPoolId=" + numberPoolId + ", state=" + state + ", createTime=" + createTime
				+ ", loginTime=" + loginTime + ", renovateTime=" + renovateTime + ", currentNum=" + currentNum
				+ ", sumNum=" + sumNum + ", successNum=" + successNum + ", falitNum=" + falitNum + ", isRecharge="
				+ isRecharge + ", smsCode=" + smsCode + ", mobilePhone=" + mobilePhone + ", operators=" + operators
				+ ", city=" + city + ", isUsed=" + isUsed + ", remark=" + remark + ", mobileOrderses=" + mobileOrderses
				+ "]";
	}

}
